<?php declare(strict_types=1);

namespace think\msg\platform\dingtalk\dto;

use think\msg\platform\dingtalk\RequestDto;

class MarkdownRichTextMsgDto extends RequestDto
{
    protected $msgtype = 'markdown';

    protected $markdown = [
        'title' => '',
        'text' => '',
        'singleTitle' => '',
        'singleUrl' => '',
    ];

    protected $at = [
        'atMobiles' => [],
        'isAtAll' => false,
    ];

    public function setTitle(string $title)
    {
        $this->markdown['title'] = $title;
    }

    public function setText(string $text): void
    {
        $this->markdown['text'] = $text;
    }

    public function setSingleTitle(string $singleTitle): void
    {
        $this->markdown['singleTitle'] = $singleTitle;
    }

    public function setSingleUrl(string $singleUrl): void
    {
        $this->markdown['singleUrl'] = $singleUrl;
    }
}